#pragma once

#include <vector>

class Thread;
class TaskBase;

class ThreadPool
{
public:
    ThreadPool(){}

	// 初始化所有线程
	void Init(int threadCount);

	// 分发线程
	void Dispatch(TaskBase*);
private:
	int threadCount = 0;
	int lastThread = -1;
	std::vector<Thread*> threads;
};
#define ThreadPoolSgt (*(Singleton<ThreadPool>::Instance()))